package com.sk.auth2.endpoints;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by admin
 * <p>
 * Date :2020/11/14
 * <p>
 * Description :
 * <p>
 * Version :1.0
 */

@RestController
public class UserEndPoint {
    private static final Logger logger = LoggerFactory.getLogger(UserEndPoint.class);

    @GetMapping("/user/{id}")
    public String getProduct(@PathVariable String id) {
        //for debug
        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        return "sukui";
    }



}
